/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.mzk.oai.metadataRepository.repository.records;

import cz.mzk.oai.metadataRepository.metadata.DateStamp;
import cz.mzk.oai.metadataRepository.metadata.MetadataFormat;
import cz.mzk.oai.metadataRepository.repository.Identifier;
import java.io.IOException;
import java.util.List;
import org.dom4j.Document;

/**
 *
 * @author Martin Řehánek (rehan at mzk.cz)
 */
public interface Manager {

    Record createRecord(Identifier identifier, MetadataFormat format, Document metadata) throws IOException;

    Record createDeletedRecord(Identifier identifier, MetadataFormat format) throws IOException;

    boolean contains(Identifier id, MetadataFormat metadataFormat);

    Record getRecord(Identifier identifier, MetadataFormat format);

    List<Record> getRecords(MetadataFormat format, DateStamp from, DateStamp to);

    void updateRecord(Identifier identifier, MetadataFormat format, Document metadata) throws IOException;

    void setRecordDeleted(Identifier identifier, MetadataFormat metadataFormat) throws IOException;

    void deleteRecord(Identifier id, MetadataFormat metadataFormat) throws IOException, NoSuchRecordException;
}
